$(document).ready(function() {
	var box = $('#box');
	var leftBtn = $('#controller > .left');
	var rightBtn = $('#controller > .right');

	leftBtn.click(function() {
		box.animate({
			left : 50
		}, {
			duration : 500,
			easing : 'swing',
			complete : function() {
				console.log(this);
			}
		});
	});

	rightBtn.click(function() {
		var properties = {
			left : 500
		};
		var options = {
			duration : 400,
			easing : 'swing',
			complete : onComplete
		};

		box.animate(properties, options);
	});

	function onComplete() {
		console.log($(this));
	}
});